import http from "./axios";

export const getData = () => {
  return http.request({
    url: "/home/getData",
    method: "get",
  });
};

// 查询
export const getUser = (params) => {
  return http.request({
    url: "/user/getUser",
    method: "get",
    params,
  });
};

// 新增
export const addUser = (data) => {
  return http.request({
    url: "/user/addUser",
    method: "post",
    data,
  });
};

// 编辑
export const editUser = (data) => {
  return http.request({
    url: "/user/editUser",
    method: "post",
    data,
  });
};

// 删除
export const delUser = (data) => {
  return http.request({
    url: "/user/delUser",
    method: "post",
    data,
  });
};

// 登录
export const getMenu = (data) => {
  return http.request({
    url: "/permission/getMenu",
    method: "post",
    data,
  });
};
